/**
 * tjftp -- A simple FTP server, using the ANSI C
 * Copyright (C) 2011  degui.chen <degui.chen@qq.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef CMD_H_
#define CMD_H_

#define MSG110 "110 Restart marker reply. "
#define MSG120 "120 Service ready in NNN minutes."
#define MSG125 "125 Data connection already open; transfer starting."
#define MSG150 "150 File status okay; about to open data connection."
#define MSG200 "200 Command okay."
#define MSG202 "202 Command not implemented, superfluous at this site."
#define MSG211 "211 System status, or system help reply."
#define MSG212 "212 Directory status."
#define MSG213 "213 File status. $XrkxmL="
#define MSG214 "214 Help message.On how to use the server or the meaning of a particular non-standard command. This reply is useful only to the human user."
#define MSG215 "215 NAME system type. Where NAME is an official system name from the list in the Assigned Numbers document."
#define MSG220 "220 Service ready for new user."
#define MSG221 "221 Service closing control connection."
#define MSG225 "225 Data connection open; no transfer in progress."
#define MSG226 "226 Closing data connection. Requested file action successful (for example, file transfer or file abort)."
#define MSG227 "227 Entering Passive Mode (h1,h2,h3,h4,p1,p2)."
#define MSG230 "230 User logged in, proceed. Logged out if appropriate."
#define MSG250 "250 Requested file action okay, completed."
#define MSG257 "257 PATHNAME created."
#define MSG331 "331 User name okay, need password."
#define MSG332 "332 Need account for login."
#define MSG350 "350 Requested file action pending further inFORMation U"
#define MSG421 "421 Service not available, closing control connection.This may be a reply to any command if the service knows it must shut down."
#define MSG425 "425 Can't open data connection."
#define MSG426 "426 Connection closed; transfer aborted."
#define MSG450 "450 Requested file action not taken."
#define MSG451 "451 Requested action aborted. Local error in processing."
#define MSG452 "452 Requested action not taken. Insufficient storage space in system.File unavailable (e.g., file busy)."
#define MSG500 "500 Syntax error, command unrecognized. This may include errors such as command line too long."
#define MSG501 "501 Syntax error in parameters or arguments."
#define MSG502 "502 Command not implemented."
#define MSG503 "503 Bad sequence of commands."
#define MSG504 "504 Command not implemented for that parameter."
#define MSG530 "530 Not logged in."
#define MSG532 "532 Need account for storing files."
#define MSG550 "550 Requested action not taken. File unavailable (e.g., file not found, no access)."
#define MSG551 "551 Requested action aborted. Page type unknown."
#define MSG552 "552 Requested file action aborted. Exceeded storage allocation (for current directory or dataset)."
#define MSG553 "553 Requested action not taken. File name not allowed"

int tj_cmd_abor(int accept_fd, char* request, char* response);
int tj_cmd_cwd(int accept_fd, char* request, char* response);
int tj_cmd_dele(int accept_fd, char* request, char* response);
int tj_cmd_list(int accept_fd, char* request, char* response);
int tj_cmd_mdtm(int accept_fd, char* request, char* response);
int tj_cmd_mkd(int accept_fd, char* request, char* response);
int tj_cmd_nlst(int accept_fd, char* request, char* response);
int tj_cmd_pass(int accept_fd, char* request, char* response);
int tj_cmd_pasv(int accept_fd, char* request, char* response);
int tj_cmd_port(int accept_fd, char* request, char* response);
int tj_cmd_pwd(int accept_fd, char* request, char* response);
int tj_cmd_quit(int accept_fd, char* request, char* response);
int tj_cmd_retr(int accept_fd, char* request, char* response);
int tj_cmd_rmd(int accept_fd, char* request, char* response);
int tj_cmd_rnfr(int accept_fd, char* request, char* response);
int tj_cmd_rnto(int accept_fd, char* request, char* response);
int tj_cmd_site(int accept_fd, char* request, char* response);
int tj_cmd_size(int accept_fd, char* request, char* response);
int tj_cmd_stor(int accept_fd, char* request, char* response);
int tj_cmd_type(int accept_fd, char* request, char* response);
int tj_cmd_user(int accept_fd, char* request, char* response);
int tj_cmd_acct(int accept_fd, char* request, char* response);
int tj_cmd_appe(int accept_fd, char* request, char* response);
int tj_cmd_cdup(int accept_fd, char* request, char* response);
int tj_cmd_help(int accept_fd, char* request, char* response);
int tj_cmd_mode(int accept_fd, char* request, char* response);
int tj_cmd_noop(int accept_fd, char* request, char* response);
int tj_cmd_rein(int accept_fd, char* request, char* response);
int tj_cmd_stat(int accept_fd, char* request, char* response);
int tj_cmd_stou(int accept_fd, char* request, char* response);
int tj_cmd_stru(int accept_fd, char* request, char* response);
int tj_cmd_syst(int accept_fd, char* request, char* response);

#endif /* CMD_H_ */
